const config = require('./config.js')
const domain = config[process.env.NODE_ENV] || ''

const base = `${domain}/app/index.php?i=13&c=entry&eid=151&s=`
// const base = `${domain}/app/index.php?i=22&c=entry&eid=159&s=`


module.exports = {
	// 配置路径别名
	configureWebpack: {
		devServer: {
			disableHostCheck: false
		}
	},
	devServer: {
		// host: "127.0.0.1",
	    proxy: {
			'/api/': {
				target: base,
				changeOrigin: true,
				secure: false,
			},
			'/index/': {
				target: base,
				changeOrigin: true,
				secure: false
			},
			'/classify/': {
				target: base,
				changeOrigin: true,
				secure: false,
			},
			'/config/': {
				target: base,
				changeOrigin: true,
				secure: false,
			},
			'/user/': {
				target: base,
				changeOrigin: true,
				secure: false,
			},
			'/order/': {
				target: base,
				changeOrigin: true,
				secure: false,
			},
			'/recharge/': {
				target: base,
				changeOrigin: true,
				secure: false,
			},
			'/account/': {
				target: base,
				changeOrigin: true,
				secure: false,
			},
			'/problem/':{
				target: base,
				changeOrigin: true,
				secure: false,
			},
			
	    },
	}

}
